<?php
return "DROP TABLE IF EXISTS `mc_blog`;
CREATE TABLE `mc_blog` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `sid` mediumint(6) NOT NULL DEFAULT '0',
  `uid` smallint(6) unsigned NOT NULL DEFAULT '0',
  `title` varchar(255) NOT NULL DEFAULT '',
  `content` mediumtext NOT NULL,
  `excerpt` text NOT NULL,
  `alias` varchar(100) NOT NULL DEFAULT '',
  `type` varchar(20) NOT NULL DEFAULT 'blog',
  `attachments` smallint(4) unsigned NOT NULL DEFAULT '0',
  `thumb` varchar(200) NOT NULL DEFAULT '',
  `views` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `comments` smallint(5) unsigned NOT NULL DEFAULT '0',
  `dateline` int(10) NOT NULL DEFAULT '0',
  `oid` smallint(4) unsigned NOT NULL DEFAULT '0',
  `isTop` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isHide` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `isLock` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `dateline` (`dateline`),
  KEY `type` (`type`),
  KEY `isTop` (`isTop`),
  KEY `sid` (`sid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mc_comment`;
CREATE TABLE `mc_comment` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `aid` mediumint(8) NOT NULL DEFAULT '0',
  `content` text NOT NULL,
  `author` varchar(100) NOT NULL DEFAULT '',
  `email` varchar(100) NOT NULL DEFAULT '',
  `url` varchar(100) NOT NULL DEFAULT '',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `dateline` int(10) NOT NULL DEFAULT '0',
  `ip` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `aid` (`aid`)
  KEY `dateline` (`dateline`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mc_attachment`;
CREATE TABLE `mc_attachment` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `aid` mediumint(8) unsigned NOT NULL default '0',
  `filename` char(25) NOT NULL default '',
  `filepath` varchar(255) NOT NULL default '',
  `filesize` char(10) NOT NULL default '',
  `dateline` int(10) NOT NULL DEFAULT '0',
  `isImage` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `aid` (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mc_tag`;
CREATE TABLE `mc_tag` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `tag` varchar(100) NOT NULL default '',
  `total` smallint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `tag` (`tag`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mc_tag_blog`;
CREATE TABLE `mc_tag_blog` (
  `postid` mediumint(8) unsigned NOT NULL default '0',
  `tagid` mediumint(8) unsigned NOT NULL default '0',
  PRIMARY KEY (`postid`, `id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mc_setting`;
CREATE TABLE `mc_setting` (
  `id` varchar(250) NOT NULL DEFAULT '',
  `val` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `mc_setting` ( `id`,`val` ) VALUES
('webname','mclog'),
('webtitle','又一个mclog'),
('webtitle2',''),
('webdesc','mclog'),
('webkey',''),
('weburl',''),
('webicp',''),
('webcopyright',''),
('Theme','default'),
('close_msg',''),
('cookie_time','30'),
('timezone','Asia/Brunei'),
('timeformat','Y-m-d H:i:s'),
('article_num','10'),
('related_num','9'),
('rss_num','10'),
('excerpt_num','200'),
('updir','Y-m-d'),
('is_close','0'),
('is_reg','0'),
('is_debug','1'),
('is_gzip','1'),
('is_code','1'),
('is_wap','1'),
('is_comment','0'),
('is_comment_audit','1'),
('is_comment_email','1'),
('is_rewrite','1'),
('is_formathtml','0'),
('uptype','*.jpg;*.png;*.gif;*.bmp;*.zip;*.rar;'),
('upsize','5'),
('tag_num','20'),
('comment_num','7'),
('rewrite_suffix','.html'),
('rewrite_page','_'),
('rewrite_301','0'),
('rewrite','a:4:{s:8:\"archives\";s:12:\"archives/%id%\";s:4:\"sort\";s:8:\"sort/%id%\";s:3:\"tag\";s:8:\"tag/%tag%\";s:6:\"search\";s:11:\"search/%key%\";}');
DROP TABLE IF EXISTS `mc_sort`;
CREATE TABLE `mc_sort` (
  `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  `sid` smallint(6) NOT NULL DEFAULT '0',
  `title` varchar(200) NOT NULL DEFAULT '',
  `alias` varchar(100) NOT NULL DEFAULT '',
  `type` char(50) NOT NULL DEFAULT 'blog',
  `total` smallint(6) unsigned NOT NULL DEFAULT '0',
  `oid` smallint(4) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `title` (`title`),
  KEY `sid` (`sid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;
INSERT INTO `mc_sort` ( `id`,`sid`,`title`,`alias`,`type`,`total`) VALUES ('1','0','系统管理组','admin', 'user', 1),('2','0','普通会员','member', 'user', 0);
DROP TABLE IF EXISTS `mc_link`;
CREATE TABLE `mc_link` (
  `id` smallint(4) unsigned NOT NULL AUTO_INCREMENT,
  `sid` smallint(4) NOT NULL DEFAULT '0',
  `title` varchar(200) NOT NULL DEFAULT '',
  `url` varchar(100) NOT NULL DEFAULT '',
  `logo` varchar(100) NOT NULL DEFAULT '',
  `description` varchar(200) NOT NULL default '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mc_plugin`;
CREATE TABLE `mc_plugin` (
  `id` smallint(4) unsigned NOT NULL AUTO_INCREMENT,
  `pid` varchar(200) NOT NULL DEFAULT '',
  `version` char(10) NOT NULL DEFAULT '',
  `author` char(50) NOT NULL DEFAULT '',
  `home` varchar(100) NOT NULL DEFAULT '',
  `description` varchar(255) NOT NULL default '',
  `config` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `pid` (`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `mc_user`;
CREATE TABLE `mc_user` (
  `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  `sid` smallint(4) NOT NULL DEFAULT '1',
  `author` varchar(100) NOT NULL DEFAULT '',
  `pass` char(32) NOT NULL DEFAULT '',
  `email` char(100) NOT NULL DEFAULT '',
  `regdate` int(10) NOT NULL DEFAULT '0',
  `lastdate` int(10) NOT NULL DEFAULT '0',
  `regip` int(10) NOT NULL DEFAULT '0',
  `lastip` int(10) NOT NULL DEFAULT '0',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `sid` (`sid`),
  UNIQUE KEY `author` (`author`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `mc_user` ( `author`,`pass`,`regdate`,`regip`) VALUES ('{$author}', '{$pass}', '{$dateline}', '{$ip}');";
?>